#include <QtGui>

#include "MainWindow.h"

MainWindow::MainWindow()
{
	glWidget = new GlWidget();

	QHBoxLayout *mainLayout = new QHBoxLayout;
	mainLayout->addWidget(glWidget);

	setLayout(mainLayout);

    setWindowTitle(tr("Hello GL"));
}

void MainWindow::keyPressEvent(QKeyEvent *e)
{
    if (e->key() == Qt::Key_Escape)
        close();
    else
        QWidget::keyPressEvent(e);
}
